class {
    onInput(input) {
        this.state = {
            size: input.size || "normal",
            variant: input.variant || "primary"
        };
    }

    // Add any other methods here
    setVariant(variant) {
        this.state.variant = variant;
    }

    setSize(size) {
        this.state.size = size;
    }

    setLabel(label) {
        this.state.label = label;
    }
}

$ {
    var variantClassName =
        state.variant !== "primary" && "app-button-" + state.variant;
}
$ var sizeClassName = state.size !== "normal" && "app-button-" + state.size;
<button class=["app-button", variantClassName, sizeClassName]>
    <span>
        <${input.renderBody}/>
    </span>
</button>